// Ttxt2Srt.h: interface for the CTtxt2Srt class.
//
//////////////////////////////////////////////////////////////////////

#pragma once

class CTtxt2Srt  
{
public:
	void setOneStyle(CStringArray &csaStyles, LPCTSTR lpOneStyle);
	TCHAR unescape(CString &cs);
	void unescapeXML(CString &cs);
	void fixSubtitle(CString &csSub);
	TCHAR * conv2Time(DWORD dw);
	int writeTime(TCHAR *tc, int num, DWORD dw1, DWORD dw2);
	bool parseTime(CStringArray &csaName, CStringArray &csaValue, DWORD &dwMilisec);
	DWORD parseTime(LPCTSTR lpTime);
	void parseProperties(LPCTSTR lpTag, CStringArray &csaName, CStringArray &csaValue);
	bool findTag(TCHAR *tc, int iLen, int iPos, int &iFrom, int &iStopAt, LPCTSTR lpTagToFind, CString &csTag);
	bool findNextTag(TCHAR *tc, int iLen, int iPos, int &iFrom, int &iStopAt, CString &csTag);
	bool bConvert(LPCTSTR lpTtxt, LPCTSTR lpSrt);
	CTtxt2Srt();
	virtual ~CTtxt2Srt();

};

